using System;
using System.Configuration;
using System.Collections.Generic;
using System.Text;

namespace SMS.PartnerUtils
{
    public class PartnerProcess
    {
        public static void ProcessSendMO(long MsgIn_ID, int Request_ID, string Mobile_No, string Service_ID, string Message, string Key_Code, string Request_Time)
        {
            // Process MsgIn for Impact
            string keyP = ConfigurationManager.AppSettings["ImpServiceKey"] != null ? ConfigurationManager.AppSettings["ImpServiceKey"].ToString().ToLower().Trim() : "";

            if (keyP.Contains(Key_Code))
            {                
                MOProcess.ProcessMessage_ImpMO(MsgIn_ID, Request_ID, Mobile_No, Service_ID, Message, Request_Time);
            }

            // Process MsgIn for KeoLive
            keyP = ConfigurationManager.AppSettings["KLServiceKey"] != null ? ConfigurationManager.AppSettings["KLServiceKey"].ToString().ToLower().Trim() : "";
            
            if (keyP.Contains(Key_Code))
            {
                MOProcess.ProcessMessage_KeoLiveMO(MsgIn_ID, Mobile_No, Service_ID, Request_ID.ToString(), Message, Request_Time);
            }

            // Process MsgIn for TIP
            keyP = ConfigurationManager.AppSettings["TIPServiceKey"] != null ? ConfigurationManager.AppSettings["TIPServiceKey"].ToString().ToLower().Trim() : "";

            if (keyP.Contains(Key_Code))
            {
                MOProcess.ProcessMessage_TIPMO(MsgIn_ID, Mobile_No, Service_ID, Request_ID.ToString(), Message, Request_Time);
            }

            // Process MsgIn for Thong Thuong
            keyP = ConfigurationManager.AppSettings["TTGServiceKey"] != null ? ConfigurationManager.AppSettings["TTGServiceKey"].ToString().ToLower().Trim() : "";

            if (keyP.Contains(Key_Code))
            {
                MOProcess.ProcessMessage_TTGMO(MsgIn_ID, Mobile_No, Service_ID, Request_ID.ToString(), Message, Request_Time);
            }
        }
    }
}
